﻿namespace Webinator.Toolboxes
{
    public class LocatorToolbox
    {
        public Locator CreateLocatorXpath(string value)
        {
            return new Locator(LocatorType.XPath, value);
        }

        public Locator CreateLocatorName(string value, bool usePartial = false)
        {
            return new Locator(LocatorType.Name, value, usePartial);
        }

        public Locator CreateLocatorId(string value, bool usePartial = false)
        {
            return new Locator(LocatorType.Id, value, usePartial);
        }

        public Locator CreateLocatorText(string value, bool usePartial = false)
        {
            return new Locator(LocatorType.Text, value, usePartial);
        }

        public Locator CreateLocatorHref(string value, bool usePartial = false)
        {
            return new Locator(LocatorType.Href, value, usePartial);
        }

        public Locator CreateLocatorClass(string value, bool usePartial = false)
        {
            return new Locator(LocatorType.Class, value, usePartial);
        }

        public Locator CreateLocatorAlt(string value, bool usePartial = false)
        {
            return new Locator(LocatorType.Alt, value, usePartial);
        }

        public Locator CreateLocatorValue(string value, bool usePartial = false)
        {
            return new Locator(LocatorType.Value, value, usePartial);
        }

        public Locator CreateLocatorCss(string value)
        {
            return new Locator(LocatorType.Css, value);
        }
    }
}
